package Datebase;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URL;

public class coursemanage {
    JFrame frame1;
    public static void main(String[] args) {
        System.setProperty("sun.java2d.noddraw", "true");
        new  coursemanage("tno");
    }
    public coursemanage(String tno){
        frame1 = new JFrame("课程信息管理系统");
        //图标
        URL resource = coursemanage.class.getClassLoader().getResource("kun.png");
        Image image = new ImageIcon(resource).getImage();
        frame1.setIconImage(image);
        //窗口尺寸
        frame1.setSize(800, 600);
        frame1.setLocationRelativeTo(null);
        frame1.setLayout(null);
        JLabel tot = new JLabel("课程信息管理系统");
        tot.setFont(new Font("微软雅黑", Font.PLAIN, 30));
        tot.setBounds(270,0,350,50);
        frame1.add(tot);

        //录入学生信息
        JButton button = new JButton("录入课程信息");
        button.setForeground(new Color(0x0A0A0A));
        button.setFont(new Font("微软雅黑", Font.PLAIN, 25));
        button.setBounds(290, 80, 200, 50);
        frame1.add(button);
        button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new tifcourse();
            }
        });

        JButton button1 = new JButton("修改课程信息");
        button1.setForeground(new Color(0x0A0A0A));
        button1.setFont(new Font("微软雅黑", Font.PLAIN, 25));
        button1.setBounds(290, 180, 200, 50);
        frame1.add(button1);
        button1.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new tcourse(tno);
            }
        });

        JButton button2 = new JButton("查看课程成绩");
        button2.setForeground(new Color(0x0A0A0A));
        button2.setFont(new Font("微软雅黑", Font.PLAIN, 25));
        button2.setBounds(290, 280, 200, 50);
        frame1.add(button2);
        button2.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new tscore();
            }
        });





        frame1.repaint();
        frame1.setVisible(true);
    }
}